<template>
  <div class="container">
    <el-tabs v-model="activeName" type="border-card" tab-position="top" class="statisTab">
      <el-tab-pane label="" name="1">
        <span slot="label"><i class="el-icon-s-release" /> 设备故障率统计</span>
        <EquipmentFaultTable :fields="fields.EquipmentFaultList" />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
import EquipmentFaultTable from './EquipmentFaultTable'
export default {
  components: {
    EquipmentFaultTable
  },
  data() {
    return {
      activeName: '1',
      fields: {
        EquipmentFaultList: [],
        ProcureArrivalList: []
      }
    }
  },
  computed: {},
  created() {},
  mounted() {
    this.initFields()
  },
  methods: {
    initFields() {
      const obj = {
        EquipmentFaultList: [],
        ProcureArrivalList: []
      }
      this.fieldList.forEach(item => {
        item.code.includes('@1') && obj.EquipmentFaultList.push(item)
        item.code.includes('@2') && obj.ProcureArrivalList.push(item)
      })
      this.fields = obj
    }
  }
}
</script>
<style lang='scss' scoped>
.container {
  padding: 10px;
}
</style>

<style lang='scss' >
.statisTab {
  .el-tabs__header {
    margin: 0 0 5px;
    .el-tabs__item {
      height: 34px;
      line-height: 34px;
    }
  }
  .el-tabs__content {
    padding: 5px !important;
  }
}
</style>
